//const URL_USER_SERVER = 'http://127.0.0.1:13001';
//const URL_RESOURCE = 'http://127.0.0.1:13002';
//const URL_BLOG = 'http://127.0.0.1:13005';
//const URL_EDU = 'http://127.0.0.1:13004';
//const URL_MSG = 'http://127.0.0.1:13003';
//const WS_MSG = 'ws://127.0.0.1:13003/ws';
//const SOCK_JS_MSG = 'http://127.0.0.1:13003/ws/sockjs';

const URL_USER_SERVER = 'https://www.j1kj.cn/server/user';
const URL_RESOURCE = 'https://www.j1kj.cn';
const URL_BLOG = 'https://www.j1kj.cn/server/blog';
const URL_EDU = 'https://www.j1kj.cn/server/edu';
const URL_MSG = 'https://www.j1kj.cn/server/msg';
const WS_MSG = 'wss://www.j1kj.cn/server/msg/ws';
const SOCK_JS_MSG = 'https://www.j1kj.cn/server/msg/ws/sockjs';

const ENV = 'debug';
//const ENV = 'produced';

const WS_CHANNEL_EDU_CHAT = 1;

const DEFAULT_ICON_URL = 'https://www.j1kj.cn/file/2018-01-16/62707166309519360_thumbnail.jpg';
const DEFAULT_ICON_ID = 62707166309519360;

const LOGIN_CHANNEL = 'a3384a9ca39efb36822d0b10b62fbd6c';// j1kj默认通道

function _autoUrl(pre, api) {
    return pre + api;
}

function userServer(api) {
    return _autoUrl(URL_USER_SERVER, api);
}

function resource(api) {
    return _autoUrl(URL_RESOURCE, api);
}

function blog(api) {
    return _autoUrl(URL_BLOG, api);
}

function edu(api) {
    return _autoUrl(URL_EDU, api);
}

function msg(api) {
    return _autoUrl(URL_MSG, api);
}

function wsMsg() {
    return WS_MSG;
}

function sockJsMsg() {
    return SOCK_JS_MSG;
}

function debug() {
    return ENV === 'debug';
}

function wsChannelEduChat() {
	return WS_CHANNEL_EDU_CHAT;
}

function defaultIconUrl() {
	return DEFAULT_ICON_URL;
}

function defaultIconId() {
	return DEFAULT_ICON_ID;
}

export default {
    userServer,
    resource,
    blog,
    edu,
    msg,
    wsMsg,
    sockJsMsg,
    debug,
    wsChannelEduChat,
    defaultIconUrl,
    defaultIconId,
}